﻿using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OpenApiExtensions
{
    [RequiresDynamicCode("aot需要")]
    public class OpenApiConfig
    {

        public Swashbuckle.AspNetCore.SwaggerUI.DocExpansion DocExpansion { get; set; } = Swashbuckle.AspNetCore.SwaggerUI.DocExpansion.None;
        /// <summary>
        /// 文件地址
        /// </summary>
        public string RoutePrefix { get; set; } = "doc";

        /// <summary>
        /// 网页标签
        /// </summary>
        public string Title { get; set; } = "测试文档";
        /// <summary>
        /// 文档标题
        /// </summary>
        public string DocumentTitle { get; set; } = "测试文档";
        /// <summary>
        /// 
        /// </summary>
        public Doc[]? Docs { get; set; }
        /// <summary>
        /// 是否开启文档 
        /// </summary>
        public bool Enable { get;   set; }
    }

    [RequiresDynamicCode("aot需要")]
   
    public class Doc
    {
        /// <summary>
        /// 版本
        /// </summary>
        public string Version { get; set; } = "v1";
        /// <summary>
        /// 文件地址
        /// </summary>
        public string RoutePrefix { get; set; } = "admin";

        /// <summary>
        /// 文档分组
        /// </summary>
        public string GroupName { get; set; } = "admin";
    }
}
